<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.jcr.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ page import="com.gzgi.framework.resource.*"%>
<%@ page import="com.gzgi.framework.storage.*"%>
<%@ page import="com.gzgi.framework.storage.jcr.*"%>
<%@ page import="com.gzgi.framework.util.*"%>
<%@ page import="org.apache.commons.lang.StringUtils"%>
<%
        org.springframework.context.support.AbstractApplicationContext ctx = new org.springframework.context.support.ClassPathXmlApplicationContext("/config/spring/repository-context.xml");
		JcrService jcrService = (JcrService)ctx.getBean("jcrService");
		org.springframework.core.io.Resource resource = new org.springframework.core.io.ClassPathResource("/jbpm.cfg.xml");
		DataFile dataFile = new DataFile();
		dataFile.setFilename(UUID32.getUUID());
		dataFile.setNodeId("001001");
		dataFile.setInputStream(resource.getInputStream());
		dataFile.setContentType("text/xml");
        jcrService.save(dataFile);
		ctx.close();
%>